<template>
    <p v-html="list">
    </p>
</template>
<script lang="ts" setup>
import { useRoute } from 'vue-router'
import axios from 'axios'
const route = useRoute()
console.log('route', route.params.id)
let list = ref('')
const postListIDFn = async (id: string | string[]) => {

  let z: any = await axios.get(`https://official.webapi.bicredit.xin/api/news/detail/${id}`)
  console.log('zzz', z)
  // if(z.msg == '成功'){
  list.value = z.data.data.content
  // console.log('list',list.value)
  //  }
}
postListIDFn(route.params.id)
// export default {
//   data(){
//     return{
//       list:''
//     }
//   },
//   created(){
//     console.log('this',this.$route.params.id)
//     this.postListIDFn(this.$route.params.id)
//   },
//   methods:{
//     async postListIDFn(id){
//     //  let z =  await postListID({id:id})
//     let z =  await this.$axios.$get(`https://official.webapi.bicredit.xin/api/news/detail/${id}`)
//     //  console.log('zzz',z)
//      if(z.msg == '成功'){
//       this.list = z.data.content
//      }
//     }
//   }
// }
</script>